<script>
import { RouterLink, RouterView } from 'vue-router'
export default {
  data() {
    return {
      isShow: true
    }
  },
  mounted() {
    window.addEventListener("beforeunload", (e) => {
      console.log('刷新');
      this.isShow = false;
      window.removeEventListener('beforeunload', () => { })//移除这个监听
    });
  }
}
</script>

<template>
  <RouterView v-if="isShow" />
</template>

<style scoped></style>
